<script setup lang="ts">
import { NCard, NSpace } from "naive-ui";
import { IconButton, IconBack, useRouter } from "@ys-lib/naive-ui";
import { useRouterName } from "../../plugin/router";

const { home } = useRouterName();
const { toName } = useRouter();
</script>

<template>
  <div class="tw-flex tw-justify-center">
    <NCard class="tw-max-w-screen-2xl">
      <NSpace vertical>
        <NSpace class="tw-border-solid tw-border-0 tw-border-b tw-p-2">
          <IconButton :icon="IconBack" @click="toName(home)"> </IconButton>
        </NSpace>
        <slot></slot>
      </NSpace>
    </NCard>
  </div>
</template>

<style scoped></style>
